Skip to content

Conversation

@agarcher
Copy link

This PR contains:

  • IMPROVED TESTS

Describe the problem you have without this PR

When using the firestore replication, it is possible to use a composite filter if you use only one filter, but doing so causes typescript errors. The problem is that the pull options filter constrains to field filters only and according to firestore a composite filter is a different thing.

What I don't understand is that the code in the test does work if you throw an as any on there to tell typescript it's safe, but then we lose type safety. It would be great if the replication could relax the typing to allow a single composite key, but when I attempt to do that I wind up with type errors in the plugin source code where it performs the query. Some attempts to resolve the type issues led me to dead ends.

@pubkey
Copy link
Owner

pubkey commented Oct 24, 2025

Hi @agarcher
PR is welcomed. We can use any internally as long as it is tested. Its only important that the outside facing types are correct.

@agarcher
Copy link
Author

Thanks for the response. I will look at fixing with an any workaround then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants